/*****************************************************
    Font generation template
*****************************************************/

#include <stdint.h>
#include "guiFonts.h"

static const uint8_t font_h32_data [] =
{
    // symbol 0x20
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

    // symbol 0x2E
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x78, 0x00,

    // symbol 0x30
    0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0x1F, 0x1F, 0x1F,
    0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xEF, 0xF7, 0xFB,
    0xFD, 0xFE, 0x00, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x0F, 0x1F, 0x3F, 0x7F, 0xFF, 0x00, 0xFF, 0xFF,
    0xFE, 0xFC, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF,
    0x00, 0x3F, 0x5F, 0x6F, 0x77, 0x7B, 0x7C, 0x7C,
    0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7B, 0x77,
    0x6F, 0x5F, 0x3F, 0x00,

    // symbol 0x31
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF8,
    0xFC, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x0F, 0x1F, 0x3F, 0x7F, 0xFF, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07,
    0x0F, 0x1F, 0x3F, 0x00,

    // symbol 0x32
    0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x1F, 0x1F,
    0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xEF, 0xF7, 0xFB,
    0xFD, 0xFE, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0,
    0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
    0xEF, 0xDF, 0xBF, 0x7F, 0x3F, 0x00, 0xFE, 0xFF,
    0xFE, 0xFD, 0xFB, 0x03, 0x03, 0x03, 0x03, 0x03,
    0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00,
    0x00, 0x3F, 0x5F, 0x6F, 0x77, 0x7B, 0x7C, 0x7C,
    0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x78, 0x70,
    0x60, 0x40, 0x00, 0x00,

    // symbol 0x33
    0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x1F, 0x1F,
    0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xEF, 0xF7, 0xFB,
    0xFD, 0xFE, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0,
    0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
    0xEF, 0xDF, 0xBF, 0x7F, 0xFF, 0x00, 0x00, 0x00,
    0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
    0x03, 0x03, 0x03, 0xFB, 0xFD, 0xFE, 0xFF, 0xFF,
    0x00, 0x00, 0x40, 0x60, 0x70, 0x78, 0x7C, 0x7C,
    0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7B, 0x77,
    0x6F, 0x5F, 0x3F, 0x00,

    // symbol 0x34
    0xFE, 0xFC, 0xF8, 0xF0, 0xE0, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF8,
    0xFC, 0xFE, 0x00, 0x3F, 0x7F, 0xBF, 0xDF, 0xEF,
    0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
    0xEF, 0xDF, 0xBF, 0x7F, 0xFF, 0x00, 0x00, 0x00,
    0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
    0x03, 0x03, 0x03, 0xFB, 0xFD, 0xFE, 0xFF, 0xFF,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07,
    0x0F, 0x1F, 0x3F, 0x00,

    // symbol 0x35
    0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0x1F, 0x1F, 0x1F,
    0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x0F, 0x07, 0x03,
    0x01, 0x00, 0x00, 0x3F, 0x7F, 0xBF, 0xDF, 0xEF,
    0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
    0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
    0x03, 0x03, 0x03, 0xFB, 0xFD, 0xFE, 0xFF, 0xFE,
    0x00, 0x00, 0x40, 0x60, 0x70, 0x78, 0x7C, 0x7C,
    0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7B, 0x77,
    0x6F, 0x5F, 0x3F, 0x00,

    // symbol 0x36
    0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0x1F, 0x1F, 0x1F,
    0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x0F, 0x07, 0x03,
    0x01, 0x00, 0x00, 0xFF, 0x7F, 0xBF, 0xDF, 0xEF,
    0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
    0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0xFF, 0xFF,
    0xFE, 0xFD, 0xFB, 0x03, 0x03, 0x03, 0x03, 0x03,
    0x03, 0x03, 0x03, 0xFB, 0xFD, 0xFE, 0xFF, 0xFE,
    0x00, 0x3F, 0x5F, 0x6F, 0x77, 0x7B, 0x7C, 0x7C,
    0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7B, 0x77,
    0x6F, 0x5F, 0x3F, 0x00,

    // symbol 0x37
    0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x1F, 0x1F,
    0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xEF, 0xF7, 0xFB,
    0xFD, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x0F, 0x1F, 0x3F, 0x7F, 0xFF, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07,
    0x0F, 0x1F, 0x3F, 0x00,

    // symbol 0x38
    0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0x1F, 0x1F, 0x1F,
    0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xEF, 0xF7, 0xFB,
    0xFD, 0xFE, 0x00, 0xFF, 0x7F, 0xBF, 0xDF, 0xEF,
    0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
    0xEF, 0xDF, 0xBF, 0x7F, 0xFF, 0x00, 0xFF, 0xFF,
    0xFE, 0xFD, 0xFB, 0x03, 0x03, 0x03, 0x03, 0x03,
    0x03, 0x03, 0x03, 0xFB, 0xFD, 0xFE, 0xFF, 0xFF,
    0x00, 0x3F, 0x5F, 0x6F, 0x77, 0x7B, 0x7C, 0x7C,
    0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7B, 0x77,
    0x6F, 0x5F, 0x3F, 0x00,

    // symbol 0x39
    0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0x1F, 0x1F, 0x1F,
    0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xEF, 0xF7, 0xFB,
    0xFD, 0xFE, 0x00, 0x3F, 0x7F, 0xBF, 0xDF, 0xEF,
    0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
    0xEF, 0xDF, 0xBF, 0x7F, 0xFF, 0x00, 0x00, 0x00,
    0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
    0x03, 0x03, 0x03, 0xFB, 0xFD, 0xFE, 0xFF, 0xFF,
    0x00, 0x00, 0x40, 0x60, 0x70, 0x78, 0x7C, 0x7C,
    0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7B, 0x77,
    0x6F, 0x5F, 0x3F, 0x00,

    // symbol 0x61
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x80, 0xE0, 0xE0, 0xE0, 0x80, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, 0xFF, 0x3F,
    0x07, 0x3F, 0xFF, 0xFC, 0xE0, 0x00, 0x00, 0x78,
    0x7F, 0x7F, 0x0F, 0x0F, 0x0E, 0x0E, 0x0E, 0x0F,
    0x0F, 0x7F, 0x7F, 0x78,

    // symbol 0x76
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xE0,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,
    0xE0, 0xE0, 0x01, 0x0F, 0x7F, 0xFF, 0xF8, 0xC0,
    0x00, 0xC0, 0xF8, 0xFF, 0x7F, 0x0F, 0x01, 0x00,
    0x00, 0x00, 0x03, 0x1F, 0x7F, 0x7E, 0x7F, 0x1F,
    0x03, 0x00, 0x00, 0x00,

};



static const uint8_t font_h32_code_table[14] =
{
    0x20,
    0x2E,
    0x30,
    0x31,
    0x32,
    0x33,
    0x34,
    0x35,
    0x36,
    0x37,
    0x38,
    0x39,
    0x61,
    0x76,
};

static const uint8_t font_h32_width_table[14] =
{
    8,
    4,
    19,
    19,
    19,
    19,
    19,
    19,
    19,
    19,
    19,
    19,
    13,
    13,
};

static const uint16_t font_h32_offset_table[14] =
{
    0,
    32,
    48,
    124,
    200,
    276,
    352,
    428,
    504,
    580,
    656,
    732,
    808,
    860,
};

const tFont font_h32 =
{
    32,          // font height
    0,                      // font width - not used with variable width
    14,          // total chars count
    0,                      // spacing
    0,                      // bytesPerChar - not used with variable width
    0,                      // firstCharCode - not used with char table
    font_h32_code_table,    // character code table
    font_h32_width_table,	// character width table
    font_h32_offset_table,	// offset table
    font_h32_data           // font data
};

